import request from '@/utils/request'

// 查询后焊材料列表
export function listBackweldMaterial(query) {
  return request({
    url: '/materials/material/backWeldMaterialList',
    method: 'get',
    params: query
  })
}

// 查询后焊材料详细
export function getBackweldMaterial(materialId) {
  return request({
    url: '/materials/material/' + materialId,
    method: 'get'
  })
}

// 新增后焊材料
export function addBackweldMaterial(data) {
  return request({
    url: '/materials/material/addBackweldMaterial',
    method: 'put',
    data: data
  })
}

// 修改后焊材料
export function updateBackweldMaterial(data) {
  return request({
    url: '/materials/backweldMaterial',
    method: 'put',
    data: data
  })
}

// 后焊器件出入库
export function updateBackWeldMaterialQuantity(data){
  return request({
    url: '/materials/backweldMaterial/updateBackWeldMaterialQuantity',
    method: 'put',
    data: data
  })
}

// 删除后焊材料
export function delBackweldMaterial(backweldMaterialId) {
  return request({
    url: '/materials/material/delBackweldMaterial/' + backweldMaterialId,
    method: 'put'
  })
}
